#include "fonctionsPropres.h"


Config conf;

int main(){
	//Inits
	srand( (int)time(NULL) );
	Jeu* jeu = new Jeu();

	/* Menus */
	int choixMain=0;
	int choixControls=0;
	string menuPrincipal[] = {"Jouer","Controls","About","Quitter"};
	Menu mPrincipal("Space Invaders", menuPrincipal, 4, conf.getMenuCoord().X, conf.getMenuCoord().Y);

	string menuControls[] = {"Gauche","Droite","Haut","Bas","Tirer","Back"};
	Menu mControls("Options> Controls", menuControls, 6, conf.getMenuCoord().X, conf.getMenuCoord().Y);

	afficherBackground();

	do{
		choixMain = mPrincipal.afficherMenu();
		switch(choixMain){
		case 0: //Jouer
			debutPartie(jeu);
			afficherBackground();
			break;
		case 1:
			do{
				choixControls = mControls.afficherMenu();
				if(choixControls<5)
					controlChange(choixControls);
			}while(choixControls!=5);
			break;
		case 2: //About
			afficherAbout();
			break;
		}
	}while(choixMain!=3);

	delete jeu;
	
	return 0;
}